$(document).ready(function() {
	var cart = getCookie("cart");
	var goodsObj = countPrice();
	var goodsallprice = goodsObj.price;
	var html = "";
	if (cart) {
		var goodsArr = JSON.parse(cart);
		goodsArr.forEach(function(item) {
			var goodsprice = item.goodsPrice.replace(/￥/g, "").trim();
			goodsunitprice = parseFloat(Number(goodsprice) * Number(item.num)).toFixed(2);
			console.log(goodsObj.price)
			html +=
				'<ul class="clearfix">' +
				'<li class="fl w12"><img src="' + item.goodsImg + '"></li>' +
				'<li class="fl w35">' +
				'<a class="goodstitle" href="">' + item.goodsName + '</a>' +
				'<p class="goodsinfo">' + item.goodsInfo + '</p>' +
				'</li>' +
				'<li class="fl goodsnum">' + item.num + '</li>' +
				'<li class="fl goodsprice">￥<span>' + goodsunitprice + '</span></li>' +
				'</ul>';
		});
		$(".item_price>span").text(goodsallprice.toFixed(2));
		var itemHeight = $(".nowrap_item").css("height");
		console.log(itemHeight)
		$(".item_price,.item_info").css({
			height: itemHeight
		});
		$(".item_info").html(html);
	}
})
